package com.techfengs.test04;

/**
* TestMethod
*/
public class TestMethod {
	// 提取一个方法，功能：将两个数求和
	public static  int addNum(int n, int n2) {
		int sum = n + n2;
		return sum;
	}
	public static void main (String[] args) {
		int a = addNum(10, 20);
		System.out.println(a);

		int b = addNum(30, 50);
		System.out.println(b);

		System.out.println(addNum(40, 82));

		/*
		 * 1. 方法的作用：提高代码复用性；
		 */
	}
}
